import request from '@/utils/request'
// 获取table数据，分页
export function getAgencyList(query) {
  return request({
    url: '/agencyInfoController/queryAgencyInfoPage',
    method: 'get',
    params: query
  })
}
// 更新单位信息
export function updateAgencyInfo(data) {
  return request({
    url: '/agencyInfoController/updateAgencyInfo',
    method: 'post',
    data
  })
}

// 更新单位信息--不需要审核的单位
export function updateAgencyInfoAudit(data) {
  return request({
    url: '/agencyInfoController/updateAgencyInfoAudit',
    method: 'post',
    data
  })
}

// 送审
export function submitVerify(data) {
  return request({
    url: '/agencyInfoController/submitVerify',
    method: 'post',
    data
  })
}
// 撤销送审
export function revokeVerify(data) {
  return request({
    url: '/agencyInfoController/revokeVerify',
    method: 'post',
    data
  })
}

export function queryAgencyNameAndState(agencyId) {
  return request({
    url: '/agencyInfoController/queryAgencyNameAndState',
    method: 'get',
    params: {
      agencyId
    }
  })
}

// 获取单位拓展信息
export function getAgencyInfo(query) {
  return request({
    url: '/agencyInfoController/getAgencyInfo',
    method: 'get',
    params: query
  })
}

// 获取单位信息
export function queryAgencyInfo(query) {
  return request({
    url: '/agencyInfoController/queryAgencyInfo',
    method: 'get',
    params: query
  })
}

// 获取table数据，分页
export function getAllAgency(query) {
  return request({
    url: '/agencyInfoController/getAllAgency',
    method: 'get',
    params: query
  })
}
// 查询单位人员是否为空
export function agencyPerson(agencyId) {
  return request({
    url: '/agencyInfoController/agencyPerson',
    method: 'get',
    params: {
      agencyId
    }
  })
}


